package com.gsta.cdn.cdr.service.impl;

import com.baomidou.mybatisplus.service.impl.ServiceImpl;
import com.gsta.cdn.cdr.entity.ResultEntity;
import com.gsta.cdn.cdr.mapper.CIDRetainMapper;
import com.gsta.cdn.cdr.mapper.FileSizeMapper;
import com.gsta.cdn.cdr.service.CIDRetainService;
import com.gsta.cdn.cdr.service.FileSizeService;
import org.springframework.stereotype.Service;

import java.util.List;
import java.util.Map;

@Service
public class CIDRetainServiceImpl extends ServiceImpl<CIDRetainMapper, ResultEntity> implements CIDRetainService {
    @Override
    public List<Map<String, Object>> CIDRetainAll(String date, String percent, int page, int pageSize) {
        page= (page-1) * pageSize;
        return baseMapper.CIDRetainAll(date,percent,page,pageSize);
    }

    @Override
    public List<Map<String, Object>> CIDRetainArea(String date, String percent) {
        return baseMapper.CIDRetainArea(date,percent);
    }

    @Override
    public List<Map<String, Object>> CIDRetainByArea(String date, String percent, String area, int page, int pageSize) {
        page= (page-1) * pageSize;
        return baseMapper.CIDRetainByArea(date,percent,area,page,pageSize);
    }

    @Override
    public List<Map<String, Object>> CIDRetainByPopName(String date, String percent, String popName, int page, int pageSize) {
        page= (page-1) * pageSize;
        return baseMapper.CIDRetainByPopName(date,percent,popName,page,pageSize);
    }

    @Override
    public List<Map<String, Object>> CIDRetainAreaPopName(String date, String percent, String area) {
        return baseMapper.CIDRetainAreaPopName(date,percent,area);
    }

    @Override
    public List<Map<String, Object>> CIDRetainByAreaPopName(String date, String percent, String area, String popName, int page, int pageSize) {
        page= (page-1) * pageSize;
        return baseMapper.CIDRetainByAreaPopName(date,percent,area,popName,page,pageSize);
    }
}
